package org.huzhp.console.core;

/**
 * @Description: 网关过滤器枚举
 * @Author: huzp
 * @CreateDate: 2020/3/19 15:48
 * @Version: 1.0
 */
public enum GatewayFilterEnum {

    ADDREQUESTHEADER("AddRequestHeader", "添加请求头", new String[]{"请求头的key", "请求头的value"}),
    ADDREQUESTPARAMETER("AddRequestParameter", "添加请求参数", new String[]{"请求参数的key", "请求参数的value"}),
    ADDRESPONSEHEADER("AddResponseHeader", "添加响应头", new String[]{"响应头的key", "响应头的value"}),
    SETREQUESTHEADER("SetRequestHeader", "设置请求头", new String[]{"请求头的key", "请求头的value"}),
    SETRESPONSEHEADER("SetResponseHeader", "设置响应头", new String[]{"响应头的key", "响应头的value"}),
    DEDUPERESPONSEHEADER("DedupeResponseHeader", "去重响应头", new String[]{"响应头key，多个空格分隔", "策略RETAIN_FIRST/RETAIN_LAST/RETAIN_UNIQUE"}),
    MAPREQUESTHEADER("MapRequestHeader", "设置", new String[]{"响应头key，多个空格分隔", "策略RETAIN_FIRST/RETAIN_LAST/RETAIN_UNIQUE"}),;

    /**
     * 过滤器名称
     */
    private String name;

    /**
     * 过滤器描述
     */
    private String desc;


    /**
     * 参数描述
     */
    private String[] args;


    GatewayFilterEnum(String name, String desc, String[] args) {
        this.name = name;
        this.desc = desc;
        this.args = args;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public String[] getArgs() {
        return args;
    }

    public void setArgs(String[] args) {
        this.args = args;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
